package com.github.pig.nideshop.weixin.controller;

import com.github.pig.common.util.ZyResult;

import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpKefuService;
import me.chanjar.weixin.mp.bean.kefu.request.WxMpKfAccountRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class KeFuContoller {
    private WxMpKefuService wxMpKefuService;
    public ZyResult add(@RequestBody WxMpKfAccountRequest wxMpKfAccountRequest) throws WxErrorException {
        return ZyResult.ok(wxMpKefuService.kfAccountAdd(wxMpKfAccountRequest));
    }
}
